using UnityEngine;
using System.Collections;

public class Tank : MonoBehaviour 
{
	int energy;
	int speed;
	int armor;
	
	enum TankType{LIGHT, MEDIUM, HEAVY};
	TankType type;
	
	public Texture tankTexture;
	public Vector2 totalFrames = new Vector2();
	public Vector2 startingFrame = new Vector2();
	Sprite sprite;
	Player player = new Player();
	
	void Awake()
	{
		sprite = new Sprite(this.transform,totalFrames, startingFrame);
		renderer.material.SetTexture("_MainTex",tankTexture);
	}
	
	// Use this for initialization
	void Start () 
	{
		
	}
	
	// Update is called once per frame
	void Update () 
	{
		sprite.Animate((int)startingFrame.y);
	}
}
